﻿using Microsoft.Practices.Unity;
using System;
using System.Data.SqlServerCe;

namespace WindowsFormsApplication2
{
    public class TaskItemsRepository:Repository<TaskItem>
    {
        public TaskItemsRepository(IDbSettings settings)
            : base(settings)
        {

        }
        public override TaskItem Map(SqlCeDataReader reader)
        {
            TaskItem task = new TaskItem();
            task.Id = Convert.ToInt32(reader["Id"]);
            task.Name = reader["Name"] as string;
            task.Notes = reader["Notes"] as string;
            return task;
        }
    }
}